<?php

namespace App\Models;

class CommentModel extends RbhBaseModel
{
    protected $table = 'comment';
    protected $guarded = [];

    /**
     * 获取模型
     * @param $request
     * @return mixed
     */
    public static function getModel($request): mixed
    {
        $Model = self::where('id', '>', 0);
        if ($request->input('uid'))
            $Model = $Model->where('uid', $request->input('uid'));
        if ($request->input('did'))
            $Model = $Model->where('did', $request->input('did'));
        return $Model;
    }
}
